package servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/userServlet")
public class UserServlet extends BaseServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String opr=req.getParameter("opr");
        System.out.println(">>>>>>>>>>>UserServlet:"+opr);
        resp.getWriter().print("<h1 style='color:red'>>>>>>>>>>>UserServlet:"+opr+"<<<<<<<<<<<h1>");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
//protected void add(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        String opr=req.getParameter("opr");
//        System.out.println(">>>>>>>>>>>UserServlet:"+opr);
//        resp.getWriter().print("<h1 style='color:red'>>>>>>>>>>>UserServlet:"+opr+"<<<<<<<<<<<h1>");
//    }
//
//    protected void del(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        String opr=req.getParameter("opr");
//        System.out.println(">>>>>>>>>>>UserServlet:"+opr);
//        resp.getWriter().print("<h1 style='color:red'>>>>>>>>>>>UserServlet:"+opr+"<<<<<<<<<<<h1>");
//    }

}
